'\" t
.TH "SD_JOURNAL_GET_USAGE" "3" "" "systemd 257~rc3" "sd_journal_get_usage"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sd_journal_get_usage \- Journal disk usage
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <systemd/sd\-journal\&.h>
.fi
.ft
.HP \w'int\ sd_journal_get_usage('u
.BI "int sd_journal_get_usage(sd_journal\ *" "j" ", uint64_t\ *" "bytes" ");"
.SH "DESCRIPTION"
.PP
\fBsd_journal_get_usage()\fR
determines the total disk space currently used by journal files (in bytes)\&. If
\fBSD_JOURNAL_LOCAL_ONLY\fR
was passed when opening the journal, this value will only reflect the size of journal files of the local host, otherwise of all hosts\&.
.SH "RETURN VALUE"
.PP
\fBsd_journal_get_usage()\fR
returns 0 on success or a negative errno\-style error code\&.
.SH "NOTES"
.PP
All functions listed here are thread\-agnostic and only a single specific thread may operate on a given object during its entire lifetime\&. It\*(Aqs safe to allocate multiple independent objects and use each from a specific thread in parallel\&. However, it\*(Aqs not safe to allocate such an object in one thread, and operate or free it from any other, even if locking is used to ensure these threads don\*(Aqt operate on it at the very same time\&.
.PP
Functions described here are available as a shared library, which can be compiled against and linked to with the
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
file\&.
.SH "HISTORY"
.PP
\fBsd_journal_get_usage()\fR
was added in version 190\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1), \fBsd-journal\fR(3), \fBsd_journal_open\fR(3)
